﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using com.haoest.Utils.Net;
using System.Net.NetworkInformation;
using com.haoest.QrPortal.Communication;

namespace com.haoest.QrPortal.FunctionPanels
{
    public sealed partial class AddDevicePanel : BasePanel
    {
        public static readonly AddDevicePanel Instance = new AddDevicePanel();
        private AddDevicePanel()
        {
            InitializeComponent();
        }

        public override void Reload()
        {
            panel_DevicesList.Controls.Clear();
            panel_DevicesList.Controls.Add(ConnectedDevicesList.Instance);
            List<NetworkInterface> enabledAdapters = NetworkManager.GetEnabledAdapters();
            foreach (NetworkInterface ni in enabledAdapters)
            {
                MessageBox.Show(ni.Description);
            }

            SocketHost socketHost = new SocketHost();
            socketHost.Port = 1110;
            socketHost.Start();
        }

    }
}
